import "./App.css";
import React from "react";
import { BrowserRouter as Router } from "react-router-dom";
import { renderRoutes } from "react-router-config";
// import RouterView from "./router/index.js";  自己实现的react-router工具
import { routes } from "./router/router";
import ChangeLanguage from "@/components/DragBox/components/ChangeLanguage";

function App() {
  // console.log(
  //   process.env.REACT_APP_VERSION,
  //   "process.env.NODE_ENV.REACT_APP_VERSION"
  // );
  return (
    <Router basename={window.__POWERED_BY_QIANKUN__ ? "/a/d/reactmicro" : "/"}>
      {renderRoutes(routes)}
      <ChangeLanguage />
    </Router>
    // <Router>
    //   <RouterView routes={routes} />
    // </Router>
  );
}

export default App;
